package com.gpay.erp.services.system.impl;

import java.util.List;

import javax.annotation.Resource;

import com.gpay.erp.core.dao.BaseDao;
import com.gpay.erp.core.dao.page.PagerModel;
import com.gpay.erp.services.system.BankcardInteface;
import org.springframework.stereotype.Service;

/**
 * 用户业务逻辑实现类
 * 
 * @author lg
 * 
 */
@Service
public class BankcardService implements BankcardInteface {
	@Resource
	private BaseDao dao;

	public void setDao(BaseDao dao) {
		this.dao = dao;
	}

	public int insert(PagerModel e) {
		return dao.insert("bankCard.add", e);
	}

	public int delete(PagerModel e) {
		return 0;
	}

	public int deletes(String[] ids) {
		if (ids != null) {
			for (String id : ids) {
				dao.delete("bankCard.deleteById", id);
			}
			return 1;
		}
		return 0;
	}

	public int update(PagerModel e) {
		return dao.update("bankCard.update", e);
	}

	public PagerModel selectOne(PagerModel e) {
		return null;
	}

	public PagerModel selectById(String id) {
		return (PagerModel) dao.selectOne("bankCard.selectOneNew", id);
	}

	/* 分页查询数据 */
	public PagerModel selectPageList(PagerModel e) {
		return dao.selectPageList("bankCard.selectPageList",
				"bankCard.dataTotal", e);
	}

	public List selectList(PagerModel e) {
		return null;
	}

}
